// 用于本地存储的JS函数库 - 基于localStorage

// 获取数据
export const getStorage = (key) => {
  const value = localStorage.getItem(key)
  if (!value) return ''
  return JSON.parse(value)
}

// 存储数据
export const setStorage = (key, value) => {
  localStorage.setItem(key, JSON.stringify(value))
}

// 删除数据
export const delStorage = (key) => {
  localStorage.removeItem(key)
}
